/*
 * @Author: Jimmy
 * @LastModifiedBy: Jimmy
 * @Date: 2024-02-23 18:41:13
 * @LastEditTime: 2024-02-25 19:06:39
 * @FilePath: /react-vite-admin/src/views/dashboard/index.tsx
 */
import IconSvg from '../../components/icon_svg'
import { observer } from "mobx-react-lite"
import { useRootStore } from "@/store"
import { Button } from "antd"
import PageWrapper from "@/components/page_wrapper"
import AuthWrapper from "@/components/auth_wrapper"

const Home = () => {
  const { settings } = useRootStore();
  const setInfo = (type: string) => {
    settings.setTheme(type);

  }
  return (
    <PageWrapper>
      <>
        Home
        <IconSvg name="area" size={30} color='#f00'></IconSvg>
        <Button type="primary" onClick={() => setInfo('default')}>默认配色</Button>
        <Button onClick={() => setInfo('light')}>浅色</Button>
        <Button type="primary" onClick={() => setInfo('blue')}>蓝色</Button>
        <AuthWrapper auth={['dashboard:btn:test','dashboard:btn:test2']}>
          <Button type="primary" onClick={() => setInfo('blue')}>蓝色</Button>
        </AuthWrapper>
        <div style={{height:'2000px',backgroundColor:'#fff'}}>

        </div>
      </>
    </PageWrapper>
  )
}

export default observer(Home)